div#oeditor-container {
  position: relative;
}

div.form > div {
  width: 700px;
  margin: 20px;
  padding: 15px;
  text-align: left;
}
div#formContainer fieldset {
  border: none;
  border-top: solid 1px #999999;
  border-bottom: solid 1px #999999;
  margin-bottom: 16px;
}
div#formContainer fieldset legend span {
  color: #505050;
  font-weight: bold;
  padding: 4px;
}
div#formContainer fieldset fieldset {
  border-top: solid #eee 6px;
  border-bottom: none;
}
div#formContainer fieldset fieldset legend span {
  color: #777
}
div.split-from-main-group-parent {
  margin: 0 0 20px 70px !important;
}

div.inputEx-Field {
  width: 500px;
  padding-top: 0.2em;
  color: #000;
}
div.inputEx-fieldWrapper {
  position: relative; /* so we can absolutely position the rte control */
}
div.inputEx-Field textarea {
  width: 496px;
  height: 200px;
  border: solid 1px #999999;
  padding: 4px;
  border-left: 6px solid #999999;
  white-space: pre;
  word-wrap: normal;
  overflow: scroll;
}
div.inputEx-Field > select {
  max-width: 100%;
}
div.inputEx-StringField-wrapper input {
  margin-top: 2px;
  margin-bottom: 2px;
  padding: 2px;
  text-align: left;
  border: solid 1px #999999;
}
div.inputEx-Field div.inputEx-StringField-wrapper > input {
  /* Ensure the selector is narrow enough that it does not hit the inputs in the
   * popup panels with class yui-editor-container.
   */
  width: 100%;
  border-left: 6px solid #999999;
}
div.inputEx-CheckBox input {
  width: auto;
}
div.inputEx-DateField {
  width: 480px;
}
button.oeditor-control,
a.inputEx-Button,
div.inputEx-Button,
button.inputEx-Button,
div.inputEx-Field input.inputEx-Button,
/* all of the following are matched by a.inputEx-List-link */
div.mc-choice + a,
div.mc-choice-container > a,
div.sa-grader + a,
div.sa-grader-container > a,
div.question-group-items a {
  display: inline-block;
  width: auto;
  background-color: #666;
  color: #FFFFFF;
  padding: 4px 12px;
  margin-left: 4px;
  margin-right: 4px;
  font-size: 12px;
  text-decoration: none;
  border: none;
  border-radius: 3px;
  transition: background 200ms;
  -webkit-transition: background 200ms;
  -moz-transition: background 200ms;
}
a.inputEx-Button.inputEx-Button-disabled {
  background-color: #ccc;
  transition: background 200ms;
  -webkit-transition: background 200ms;
  -moz-transition: background 200ms;
}

.gcb-pull-right {
  float: right;
}

.gcb-pull-left {
  float: left;
}
/*
 * CSS for the unit/lesson organizer
 * TODO(jorr): Rework this CSS to have clearer headers for nested properties
 */

div#formContainer div.organizer fieldset {
  border: none;
  min-width: 300px;
  margin-bottom: 0;
  -webkit-padding-before: 0;
  -webkit-padding-after: 0;
}
div#formContainer div.organizer div.inputEx-label {
  width: auto;
}
div.organizer div.inputEx-ListField-subFieldEl > fieldset > div.inputEx-fieldWrapper {
  white-space: nowrap;
}
div.organizer div.inputEx-ListField-subFieldEl > fieldset > div.inputEx-fieldWrapper > div {
  float: none;
  display: inline;
  vertical-align: top;
}
div.organizer div.inputEx-ListField-childContainer > div {
  white-space: nowrap;
  border-top: solid 1px #eee;
}
div.organizer div.inputEx-ListField-Arrow {
  float: none;
  display: inline-block;
  float: right;
}
div.organizer a.inputEx-List-link {
  display: none;
}


img.framed {
  border: 1px solid #ccc;
  padding: 3px;
  max-width: 400px;
}

/*
 * CSS for the lightbox used by the GCB Rich Text Editor.
 */

#modal-editor > .background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  opacity: 0.5;
  filter: alpha(opacity=50);
  z-index: 1000;
}
#modal-editor > iframe {
  position: fixed;
  top: 50%;
  height: 500px;
  margin-top: -250px;
  left: 50%;
  width: 780px;
  margin-left: -350px;
  z-index: 1001;
  background-color: #fff;
  border-radius: 10px;
  transition: height 500ms, margin-top 500ms;
  -webkit-transition: height 500ms, margin-top 500ms;
  -moz-transition: height 500ms, margin-top 500ms;
}
.hidden {
  display: none;
}

/*
 * CSS for the Tab Bar used by rich text editor field and elsewhere.
 */
div.tabbar {
  margin: 5px 0;

}
div.tabbar > button {
  display: inline-block;
  padding: 4px 0;
  width: 7em;
  text-align: center;
  background-color: #dcdcdc;
  border: solid #666 1px;
  margin-right: 3px;
  cursor: pointer;
}
div.tabbar > button.selected {
  font-weight: bold;
  background-color: #ccc;
}

.editor-field-tabbar > button {
  border-radius: 4px;
  border: solid #000 1px;
  border-color: transparent;
  margin-right:4px;
  background-color: inherit;
  color: #888;
  outline: 0;
}
.editor-field-tabbar > button:hover,
.editor-field-tabbar > button.selected {
  border-color: #ccc;
  color: #444;
}
.editor-field-tabbar > button.selected {
  background-color: #ddd;
}

/*
 * CSS for the ToggleButton class.
 */
label.togglebutton {
  height: 20px;
  width: 20px;
  vertical-align: middle;
  font-size: 20px;
  padding: 5px;
  margin: 1px;
  color: #888;
}
label.togglebutton:hover {
  margin: 0;
  border-radius: 4px;
  border: solid #ccc 1px;
  color: #444;
}
label.togglebutton.selected {
  margin: 0;
  border-radius: 4px;
  border: solid #ccc 1px;
  background-color: #ddd;
  color: #444;
}
label.togglebutton input[type="checkbox"] {
  display: none;
}

/*
 * CSS for the GCB Rich Text Editor.
 */
div.cb-editor-field div.buttonbar-div .togglebutton {
  margin-right: 5px;
}
div.cb-editor-field div.buttonbar-div .togglebutton:hover {
  margin-right: 4px;
}
div.cb-editor-field label.togglebutton.html-button {
  font-size: 16px;
}
div.cb-editor-field div.buttonbar-div {
  margin-bottom: 10px;
  position: relative;
}
div.cb-editor-field div.editors-div {
  z-index: inherit;
  min-width: 200px;
  min-height: 200px;
}
div.cb-editor-field div.editors-div > div {
  /* The sub-editors must be positioned absolutely so that their size doesn't
   * directly affect the size of the editor-div. */
  position: absolute;
}
div.cb-editor-field {
  width: 510px;
}
div.cb-editor-field div.preview-div iframe {
  width: 100%;
  height: 100%;
}
.yui-toolbar-group-insertitem h3 {
  width: auto !important;
}
div.yui-toolbar-titlebar {
  /* Hide the top titlebar on the RTE. */
  display: none;
}
div.cb-editor-field div.preview-div .ajax-spinner {
  z-index: 1000;
  text-align: center;
}
div.cb-editor-field div.preview-div .ajax-spinner > .background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  opacity: 0.3;
  filter: alpha(opacity=30);
}
div.cb-editor-field div.preview-div .ajax-spinner > .spinner {
  font-size: 400%;
  position: absolute;
  top: 40%;
}

/*
 * CSS for the Code field
 */

.new-form-layout .inputEx-Field.cb-code-field {
  width: inherit;
  float: none;
  margin-left: 150px;
}

/*
 * Common CSS for multiple choice and short answer
 */

.mc-choice-container,
.sa-grader-container {
  clear: both;
}

.mc-choice-container > .inputEx-ListField-childContainer > div,
.sa-grader-container > .inputEx-ListField-childContainer > div {
  position: relative;
  margin-bottom: 25px;
}

#formContainer .mc-choice > fieldset,
#formContainer .sa-grader > fieldset {
  margin-bottom: 5px;
  padding-bottom: 0;
}

.mc-choice-container > .inputEx-ListField-childContainer,
.sa-grader-container > .inputEx-ListField-childContainer {
  margin-bottom: 20px;
}

.sa-container fieldset > .inputEx-fieldWrapper,
.mc-container fieldset > .inputEx-fieldWrapper {
  margin-top: 14px;
}

/*
 * CSS for multiple choice question creation.
 */

form.mc-container > fieldset {
  padding: 15px 0;
}
div.mc-container a:hover {
  text-decoration: none;
}
div.mc-container div.cb-editor-field {
  width: 550px;
}
div.mc-container div.CodeMirror {
  /* The question statement. */
  height: 45px;
  margin: 0;
  padding: 0;
}
div.mc-container > fieldset > div.inputEx-fieldWrapper > div.inputEx-label {
  width: 80px;
}
div.mc-question,
div.mc-description,
div.mc-selection,
div.set-scores-toggle,
.toggle-feedback {
  margin-left: 87px;
}

.mc-choice > fieldset > .inputEx-fieldWrapper {
  /* Fieldset contributes 10px so this is really the same as above */
  margin-left: 77px;
}

div.mc-description input {
  width: 546px;  /* allow for 2px padding */
  margin: 0;
}
div.set-scores-toggle {
  margin-top: 10px;
}

div.mc-choice {
  float: none;
  margin: 0;
}

.mc-choice > fieldset > .inputEx-fieldWrapper > .inputEx-label {
  /* Score label */
  display: none;
}

.mc-choice-score {
  position: absolute;
  top: 39px;
  left: -50px; /* Counteracts the fieldWrapper's margin */
}

.mc-choice-score input {
  width: 25px;
}

.mc-choice > fieldset > legend + div + div + div {
  /* The feedback editor */
  margin-top: 15px;
}

div.mc-choice > div.toggle-feedback > button,
div.mc-choice + a {
  /* The show-feedback and the delete-choice button */
  color: #000;
  background-color: #f2f2f2;
  border: solid #808080 1px;
  padding: 3px;
  font-weight: bold;
  font-size: 10px;
  float: left;
}

/*
 * CSS for short answer question creation.
 */

div.sa-container a:hover {
  text-decoration: none;
}
div.sa-container div.tabbar > button {
  padding: 0;
}
div.sa-container div.cb-editor-field {
  width: 510px;
}
div.sa-question,
div.sa-hint,
div.sa-feedback,
div.sa-grader-text,
div.sa-grader-feedback {
  margin-top: 5px;
}
div.sa-question,
div.sa-hint,
div.sa-feedback,
div.sa-description,
div.sa-rows,
div.sa-columns {
  margin-left: 87px;
}
div.sa-description input,
div.sa-grader-text input {
  width: 506px;  /* allow for 2px padding */
  margin: 0;
}
div.sa-grader-text, div.sa-grader-feedback {
  margin-left: 67px;
}
div.sa-grader-question {
  width: 660px;
}
div.sa-grader {
  width: 650px;
}
div.sa-grader > fieldset > div.inputEx-fieldWrapper > div.inputEx-label {
  width:60px;
}
div.sa-grader + a { /* The delete choice button */
  float: right;
}
div.sa-grader-score input {
  width: 50px;
}

/*
 * CSS for GIFT questions creation.
 */
div.gift-container > fieldset > div.inputEx-fieldWrapper > div.inputEx-label {
  width: 80px;
}
div.gift-container a:hover {
  text-decoration: none;
}
div.gift-container textarea {
  height: 375px;
  width: 510px;
  margin: 0;
  padding: 0;
}
div.gift-questions,
div.gift-description {
  margin-left: 87px;
}
div.gift-questions,
div.gift-description {
  margin-top: 10px;
}
div.gift-description input {
  width: 506px;  /* allow for 2px padding */
  margin: 0;
}

/*
 * CSS for question group creation.
 */

div.question-group-question select {
  width: 250px;
}
div.question-group-item {
  width: 650px;
}
div.question-group-item div.inputEx-fieldWrapper {
  display: inline-block;
  margin-right: 20px;
}
div.question-group-item div.inputEx-label {
  width: 60px;
}
div.question-group-weight,
div.question-group-question {
  float: left;
}
div.question-group-weight input {
  width: 50px;
}
div.question-group-items a:hover {
  text-decoration: none;
}
div.question-group-items div.inputEx-ListField-childContainer > div {
  position: relative;
  width: 650px;
}
div.question-group-items div.inputEx-ListField-ArrowUp,
div.question-group-items div.inputEx-ListField-ArrowDown,
div.question-group-items div.inputEx-ListField-ArrowDown + a {
  position: absolute;
  top: 25px;
}
div.question-group-items div.inputEx-ListField-ArrowUp {
  left: 500px;
}
div.question-group-items div.inputEx-ListField-ArrowDown {
  left: 520px;
}
div.question-group-items div.inputEx-ListField-ArrowDown + a {
  left: 540px;
}

/*
 * CSS for assignment creation.
 */
div.assessment-editor-button-holder {
  text-align: right;
  margin: 0 0 5px 0;
}
div.assessment-editor-check-answers > input[type=checkbox] {
  width: auto;
}

/*
 * CSS for label selection.
 */

div#formContainer div.label-group-list {
  border: solid 1px #999999;
  border-left: solid 6px #999999;
  padding: 3px;
}

div.label-group-list > span, div.label-group-list a, div.label-group span {
  display: none;
}

div#formContainer div.label-group-list div.inputEx-Group {
  margin-left: 0;
}

div#formContainer div.label-group-list div.inputEx-Group fieldset {
  border-top: none;
  margin-left: 0;
  margin-bottom: 0;
  padding: 0;
}

div#formContainer div.label-group fieldset {
  border-top: none;
  margin-bottom: 0;
  padding: 0;
}

div#formContainer div.label-group div.inputEx-fieldWrapper {
  float: left;
  display: inline-block;
}
div#formContainer div.label-group div.inputEx-Field {
  width: auto;
  margin-left: 0.5em;
}

div.label-group div.label-description {
  padding-top: 0.2em;
  margin-left: 1.0em;
}

div.label-none-in-group {
  padding-top: 0.33em;
  margin-left: -3.0em;
  background-color: #fff
}

div.CodeMirror {
  border: solid 1px #999999;
  height: 200px;
}

/* Styling for YUI and InputEx components. */

.yui-resize .yui-resize-handle-br {
  z-index: 10;
}

div#formContainer div.yui-toolbar-container > fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}

/*
 * Styles for the "new form layout".
 */

div#formContainer > div.inputEx-Group.new-form-layout {
  width: 100%;
  min-width: 750px;
  margin: 0;
  padding: 0;
}
div#formContainer > div.inputEx-Group.new-form-layout > form > fieldset {
  border: none;
  margin: 0 0 16px 0;
  padding: 0;
}
div#formContainer > div.inputEx-Group.new-form-layout > form > fieldset > legend > span {
  font-size: 20px;
}
div#formContainer > div.inputEx-Group.new-form-layout > form > fieldset > div > fieldset {
  /* For nested groups. */
  border: none;
  margin: 0 0 16px 0;
  padding: 0;
}
div#formContainer > div.inputEx-Group.new-form-layout > form > fieldset > div > fieldset > legend {
  /* For nested groups. */
  font-size: 15px;
  padding: 40px 0 0 0;
}
div.new-form-layout div.split-from-main-group-parent {
  margin: 0 0 20px 0 !important;
}
div.new-form-layout div.inputEx-Field {
  width: auto;
}
div.new-form-layout div.inputEx-label {
  text-align: left;
  padding: 0;
  margin-top: 3px;
  margin-right: 10px;
}
div.new-form-layout div.inputEx-label > label {
  font-weight: bold !important;
  font-size: 12px;
  color: rgb(47, 105, 107);
}
div.new-form-layout div.inputEx-fieldWrapper.gcb-text-input > div.inputEx-label {
  margin-top: 13px;
}
div.new-form-layout div.inputEx-fieldWrapper.gcb-checkbox-input > div.inputEx-label {
  margin-top: 6px;
}
div.new-form-layout div.inputEx-fieldWrapper.gcb-select > div.inputEx-label {
  margin-top: 5px;
}
div.new-form-layout > form > fieldset > div.inputEx-fieldWrapper,
div.new-form-layout > form > fieldset > div > fieldset > div.inputEx-fieldWrapper,
div.split-from-main-group-parent {
  margin: 20px 0 0 0;
  padding: 20px 20px 20px 20px;
  background-color: #f8f8f8;
  border-radius: 5px;
  border: solid #D7D7D7 1px;
}
div.new-form-layout div.inputEx-description {
  margin-top: 6px;
  max-width: 500px;
}
div.new-form-layout div.inputEx-Field.inputEx-CheckBox > div.inputEx-description {
  display: inline-block;
  margin-left: 5px;
}
div.new-form-layout div.inputEx-Field input[type=checkbox] {
  vertical-align: top;
}
div.new-form-layout div.inputEx-StringField-wrapper > input[type=text],
div.new-form-layout div.inputEx-Field textarea {
  /* Ensure the selector is narrow enough that it does not hit the inputs in the
   * popup panels with class yui-editor-container.
   */
  width: 500px;
  padding: 7px 8px;
  border: solid 1px #999;
  border-radius: 3px;
  font-size: 12px;
}
div#formContainer  > div.inputEx-Group.new-form-layout div.label-group-list {
  background-color: #fff;
  border-radius: 3px;
  border: solid 1px #999;
  padding: 5px 15px;;
}
div.new-form-layout div.inputEx-Form-buttonBar {
  max-width: 500px;
  margin: 20px 0 0 0;
}
div.new-form-layout div.cb-editor-field {
  width: inherit;
  float: none;
  margin-left: 139px;
}
div.new-form-layout div.cb-editor-field div.CodeMirror {
  height: 400px;
}
div.new-form-layout div.cb-editor-small div.CodeMirror {
  height: 200px;
}
.hidden-header > fieldset > .inputEx-Group-legend {
  display:none;
}
